<template>
		<iframe :onload="onloadCode" style="width:100%;height:100%;border:1px solid #fff;background: #000;"></iframe>
</template>

<script>
	export default {
		name:"nVideo",
		 props: {
		            src: {
						type: String,
						default: ''
					}
		        },
		data() {
			return {
				onloadCode: ''
			};
		},
		 created() {
		            this.onloadCode =
		                `this.contentWindow.document.body.innerHTML = '<video controls  style="width: 100%;height: 100%"  object-fit="contain" poster="${this.src}?x-oss-process=video/snapshot,t_0,f_jpg,w_0,h_0" src="${this.src}"></video>';`
		        }
	
	}
</script>

<style>

</style>